package com.heima.stu_system;

import java.util.ArrayList;

public class StudentSystem implements StudentManagementSystem{
    public StudentSystem(ArrayList<Student> list) {
        this.list = list;
    }

    private ArrayList<Student>
            list;
    @Override
    public void addStudent(Student student) {
        list.add(student);
    }

    @Override
    public void displayStudents() {
        for (int i = 0; i < list.size(); i++) {
            Student s = list.get(i);
            s.study();
        }

    }
}
